<HTML>
<HEAD>
<TITLE>DefaultProjectName - CPixmap</TITLE>
<script type="text/javascript">
  var relPathToCommmon = "../../common/";
  var relPathToHelpDir = "../../common/help/";
</script>
<script type="text/javascript" src="../../common/jsdyn.js" language="JavaScript"></script>
<script type="text/javascript" src="../../common/js.js" language="JavaScript"></script>
<script type="text/javascript" src="leftmenu.js" language="JavaScript"></script>
<script type="text/javascript">
  var toSearchPage     = "_search','../../search";
  Body1();
</script>
<div class="headerPage">CPixmap</div>
<div class="path"><a href="#" OnMouseOver="link('','../../index',this)" class="pathLink">OOXlib</A><img src="../../common/path-arrow.gif" class="path-arrow"><a href="#" OnMouseOver="link('_dir','include0',this)" class="pathLink">include</A><img src="../../common/path-arrow.gif" class="path-arrow"><a href="#" OnMouseOver="link('_class','CPixmap4032',this)" class="pathLink">CPixmap</A><img src="../../common/path-arrow.gif" class="path-arrow"><span class="pathNonLink">CPixmap</span></div>
<script type="text/javascript">
 Body2();
 BodyLeftMenuStart();
WriteLeftMenu("","","","");
 BodyLeftMenuEnd();
 Body3();
</script>
<span class="tabInActive"><a href="#" OnMouseOver="linkTab('_member','CPixmap3696799750','_description',this)" class="tabLinkInActive">Description</a></span>
<span class="tabActive"><a href="#" OnMouseOver="linkTab('_member','CPixmap3696799750','_source',this)" class="tabLinkActive">Source</a></span>
<span class="tabInActive"><a href="#" OnMouseOver="linkTab('_member','CPixmap3696799750','_callgraph',this)" class="tabLinkInActive">Call Graph</a></span>
<script type="text/javascript">
 Body4();
</script>
<div class="contentAirTop"></div>
<div class="paragraph2NoTopPadding">Start Line: 59</div>
<pre class="codeExamples">
 <a href="#" onMouseOver="link('_member','CPixmap3696799750',this); overLibDiagram();return overlib('<strong>Syntax</strong><BR>CPixmap<BR>(const CXServerConnection * pXServerConnection, const CScreen * pScreen, const ::std::string & PixmapPath)',CAPTION,'<strong>Brief description</strong><BR>Constructor.');" onMouseOut="return nd();">OOXlib::CPixmap::CPixmap</a>(const CXServerConnection *pXServerConnection, const CScreen *pScreen, const::std::string &amp;PixmapPath)
: <a href="#" onMouseOver="link('_member','m_pXServerConnection31453606',this); overLibDiagram();return overlib('<strong>Syntax</strong><BR>CXServerConnection *&nbsp;&nbsp;m_pXServerConnection ',CAPTION,'<strong>Brief description</strong><BR>');" onMouseOut="return nd();">m_pXServerConnection</a>(pXServerConnection) {
    if(NULL == <a href="#" onMouseOver="link('_member','m_pXServerConnection2399711695',this); overLibDiagram();return overlib('<strong>Syntax</strong><BR>CXServerConnection *&nbsp;&nbsp;m_pXServerConnection ',CAPTION,'<strong>Brief description</strong><BR>');" onMouseOut="return nd();">m_pXServerConnection</a>) {
        <a href="#" onMouseOver="link('_member','OOXLib_THROW3402324798',this); overLibDiagram();return overlib('<strong>Syntax</strong><BR>define&nbsp;&nbsp;OOXLib_THROW&nbsp;&nbsp;(ctor_name )',CAPTION,'<strong>Brief description</strong><BR>The main OOXlib throw replacement macro.');" onMouseOut="return nd();">OOXLib_THROW</a>(CNULLPtrConnectionException);
    }
    if(NULL == pScreen) {
        <a href="#" onMouseOver="link('_member','OOXLib_THROW3402324798',this); overLibDiagram();return overlib('<strong>Syntax</strong><BR>define&nbsp;&nbsp;OOXLib_THROW&nbsp;&nbsp;(ctor_name )',CAPTION,'<strong>Brief description</strong><BR>The main OOXlib throw replacement macro.');" onMouseOut="return nd();">OOXLib_THROW</a>(CNULLPtrScreenException);
    }
    if(PixmapPath.empty()) {
        <a href="#" onMouseOver="link('_member','OOXLib_THROW3402324798',this); overLibDiagram();return overlib('<strong>Syntax</strong><BR>define&nbsp;&nbsp;OOXLib_THROW&nbsp;&nbsp;(ctor_name )',CAPTION,'<strong>Brief description</strong><BR>The main OOXlib throw replacement macro.');" onMouseOut="return nd();">OOXLib_THROW</a>(CNULLPtrFilePathException);
    }
    ::XpmAttributes xpma;
    xpma.valuemask = 0;
    // As seen in some source code, available somewhere on the web, the ::XpmReadFileToPixmap function returns nil on success,
    // but, unfortunately, I haven't found this in any help. And yes, we need 'const_cast', cause the file name isn't const here...
    // Note: this function is from the Xpm library.
    if(0 != ::XpmReadFileToPixmap(pXServerConnection-&gt;Get(), static_cast&lt; ::Drawable&gt;(::XRootWindow(pXServerConnection-&gt;Get(), pScreen-&gt;Get())), const_cast&lt;char*&gt;(PixmapPath.c_str()), &amp;m_Pixmap, &amp;m_Mask, &amp;xpma)) {
        <a href="#" onMouseOver="link('_member','OOXLib_THROW3402324798',this); overLibDiagram();return overlib('<strong>Syntax</strong><BR>define&nbsp;&nbsp;OOXLib_THROW&nbsp;&nbsp;(ctor_name )',CAPTION,'<strong>Brief description</strong><BR>The main OOXlib throw replacement macro.');" onMouseOut="return nd();">OOXLib_THROW</a>(CXpmReadFileToPixmapException);
    }
    m_PixmapPath = PixmapPath;
    m_Size.Set(xpma.width, xpma.height);
    ::XpmFreeAttributes(&amp;xpma);
}
</pre><div class="contentAirBottom"></div>
<script type="text/javascript">
 Body5();
Statistics("","","","","");
 Body6();
SetPageTab('_member','_source');
</script>
